<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #box{
            width: 1000px;
            height: 800px;
            border: 1px solid #000;
            position: relative;
            margin: 0 auto;
        }
        #plane{
            width: 60px;
            height: 60px;
            background: blue;
            position: absolute;
            bottom: 0;
            left: 470px;
        }
        .bullet{
            width: 30px;
            height: 30px;
            background: red;
            /*position: absolute;
            bottom: 60px;
            left: 15px;*/
        }
    </style>
</head>
<body>
    <div id="box">
        <div id="plane"></div>
        <div class="bullet"></div>
    </div>
</body>
</html>
<script>
    var box = document.getElementById("box");
    var plane = document.getElementById("plane");
    box.onmousemove = function(event){
        var e = event||window.event;
        var left = e.clientX-this.offsetLeft;
        if(left>=0&&left<=940)
        plane.style.left = left+"px";
    }
    function(){
        var bul = document.createElement("div")
    }
</script>